package pri.damai.xiaowu.auth.security.loginlogic;

import lombok.AllArgsConstructor;
import pri.damai.xiaowu.common.core.enums.base.StringEnumerator;

/**
 * 登录方式
 * @Desc
 * @Author DaMai
 * @Date 2021/10/13 17:47
 * 但行好事，莫问前程。
 */
@AllArgsConstructor
public enum LoginTypeEnums implements StringEnumerator {
    /** 登录方式 */
    USERNAME_CODE("ACCOUNT_PASSWORD_CODE", "普通用户名密码登录", 1),
    PHONE_CODE("PHONE_CODE", "手机号验证码登录", 2);

    private final String code;
    private final String msg;
    private final Integer type;

    @Override
    public String code() {
        return code;
    }

    @Override
    public String desc() {
        return msg;
    }

    public int type() {
        return type;
    }
}
